package com.kuang.user.controller;

import com.kuang.bascic.utils.AjaxResult;
import com.kuang.user.service.WxLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
@RestController
@RequestMapping("/wxuser")
public class WxLoginCtroller {
    @Autowired
    private WxLoginService wxLoginService;
    @PostMapping("/login")
    public AjaxResult wxLogin(@RequestBody Map<String,String> map){
      return   wxLoginService.wxLogin(map);
        //{code=031FUGml2Xqnt94jJrll2gCNLI1FUGmr, state=STATE}
    }
    @PostMapping("/binder")
    public AjaxResult bind(@RequestBody Map<String,String> map){
        return  wxLoginService.bind(map);

    }


}
